package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.CityDao;
import com.home.qh.dao.CustomerDao;
import com.home.qh.model.City;
import com.home.qh.model.Customer;
import com.home.qh.service.CityManager;
import com.home.qh.service.CustomerManager;

@Service("customerManager")
public class CustomerManagerImpl extends GenericManagerImpl<Customer, Long> implements	CustomerManager {
	CustomerDao customerDao;

    @Autowired
    public CustomerManagerImpl(CustomerDao customerDao) {
        super(customerDao);
        this.customerDao = customerDao;
    }

    public List<Customer> getCustomerByName(String customerName){
    	return customerDao.getCustomerByName(customerName);
    }
    
	public List<Customer> getCustomerByCustomer(Customer customer, String sort, boolean desc, int startResult, int maxResults){
		return customerDao.getCustomerByCustomer(customer, sort, desc, startResult, maxResults);
	}
	
}
